package com.RyanRestaurant.Config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * 自定义mvc配置
 */

@Configuration
public class MyMVCConfig implements WebMvcConfigurer {

    /**
     * 能以重定向的形式访问登录后的页面
     */
    @Override
    public void addViewControllers(ViewControllerRegistry registry)
    {
        registry.addViewController("/main.html").setViewName("index");
    }
}
